package com.demo.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.demo.core.exception.ParameterException;
import com.demo.domain.PracticeProject;
import org.springframework.lang.Nullable;

import java.util.List;


public interface PracticeProjectService extends IService<PracticeProject> {
    //搜索赛事(根据关键词得一系列相似赛事)
    public Page<PracticeProject> getProjectByKey(@Nullable String type, @Nullable String kw, int current, int size) throws ParameterException;

    //根据关键词搜索赛事名
    public List<String> getProjectsByName(String kw, Long uid) throws Exception;

    //分页得到所有赛事
    public IPage getAllProjectsByPage(int current, int size) throws Exception;

    //得到某赛事得详情信息
    public PracticeProject getProjectDetailByName(String name) throws Exception;

    //搜索赛事
    public LambdaQueryWrapper<PracticeProject> searchPracticeProject(String ppName, String ppSuitableStudent,String ppCategory) throws Exception;
}
